{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'2.3.0'"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import os\n",
    "import json\n",
    "import codecs\n",
    "import numpy as np\n",
    "import tensorflow as tf\n",
    "import yaml\n",
    "import DM_process\n",
    "\n",
    "os.environ[\"CUDA_VISIBLE_DEVICES\"] = '1'\n",
    "gpus = tf.config.experimental.list_physical_devices(device_type='GPU')\n",
    "for gpu in gpus:\n",
    "    tf.config.experimental.set_memory_growth(gpu, True)\n",
    "tf.__version__"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "params = {\n",
    "    'batch_size': 64,\n",
    "    'lr' : 0.001,\n",
    "    'epochs': 500,\n",
    "    'drops' : [0.1]\n",
    "         }"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "with open('./DM_char.json', mode='r', encoding='utf-8') as f:\n",
    "    dicts = json.load(f)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "path = '../stories/all_stories.yml'\n",
    "with open(path, 'r', encoding='utf-8') as f:\n",
    "    dataset = yaml.load(f.read(),Loader=yaml.Loader)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "action2id = dicts['action2id']\n",
    "intent2id = dicts['intent2id']\n",
    "slots2id = dicts['entities2id']\n",
    "id2action = dicts['id2action']\n",
    "id2intent = dicts['id2intent']\n",
    "id2slots = dicts['id2entities']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "previous_action_len = len(action2id)\n",
    "# print(previous_action_len)\n",
    "slots_len = len(slots2id)\n",
    "# print(slots_len)\n",
    "user_intent_len = len(intent2id)\n",
    "# print(user_intent_len)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "data_set = DM_process.split_data(dataset)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "previous_action, slots, user_intent, action = DM_process.extract_conv_data(data_set,action2id,slots2id,intent2id)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "def Dataset(previous_action_inputs, slots_inputs,user_intent_inputs,pre_action):\n",
    "    dataset = tf.data.Dataset.from_tensor_slices(({\n",
    "    \"previous_action_inputs\" : previous_action_inputs,\n",
    "    \"slots_inputs\" : slots_inputs,\n",
    "    \"user_intent_inputs\" : user_intent_inputs\n",
    "    },\n",
    "    {\n",
    "        \"pre_action\" : pre_action\n",
    "    }))\n",
    "    dataset = dataset.batch(params['batch_size'])\n",
    "    return dataset"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "train_dataset =  Dataset(previous_action, slots, user_intent, action)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Model: \"functional_1\"\n",
      "__________________________________________________________________________________________________\n",
      "Layer (type)                    Output Shape         Param #     Connected to                     \n",
      "==================================================================================================\n",
      "previous_action_inputs (InputLa [(None, 33)]         0                                            \n",
      "__________________________________________________________________________________________________\n",
      "slots_inputs (InputLayer)       [(None, 13)]         0                                            \n",
      "__________________________________________________________________________________________________\n",
      "user_intent_inputs (InputLayer) [(None, 39)]         0                                            \n",
      "__________________________________________________________________________________________________\n",
      "embedding (Embedding)           (None, 33, 32)       4096        previous_action_inputs[0][0]     \n",
      "__________________________________________________________________________________________________\n",
      "embedding_1 (Embedding)         (None, 13, 32)       4096        slots_inputs[0][0]               \n",
      "__________________________________________________________________________________________________\n",
      "embedding_2 (Embedding)         (None, 39, 32)       4096        user_intent_inputs[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "concatenate (Concatenate)       (None, 85, 32)       0           embedding[0][0]                  \n",
      "                                                                 embedding_1[0][0]                \n",
      "                                                                 embedding_2[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "bidirectional (Bidirectional)   (None, 85, 128)      37632       concatenate[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "layer_normalization (LayerNorma (None, 85, 128)      256         bidirectional[0][0]              \n",
      "__________________________________________________________________________________________________\n",
      "global_average_pooling1d (Globa (None, 128)          0           layer_normalization[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "pre_action (Dense)              (None, 33)           4257        global_average_pooling1d[0][0]   \n",
      "==================================================================================================\n",
      "Total params: 54,433\n",
      "Trainable params: 54,433\n",
      "Non-trainable params: 0\n",
      "__________________________________________________________________________________________________\n"
     ]
    }
   ],
   "source": [
    "tf.keras.backend.clear_session()\n",
    "previous_action_inputs = tf.keras.layers.Input(shape=(previous_action_len,), name = 'previous_action_inputs')\n",
    "slots_inputs = tf.keras.layers.Input(shape = (slots_len,), name = 'slots_inputs')\n",
    "user_intent_inputs = tf.keras.layers.Input(shape = (user_intent_len,), name = 'user_intent_inputs')\n",
    "\n",
    "previous_action_embed = tf.keras.layers.Embedding(128,32)(previous_action_inputs)\n",
    "slots_embed = tf.keras.layers.Embedding(128,32)(slots_inputs)\n",
    "user_intent_embed = tf.keras.layers.Embedding(128,32)(user_intent_inputs)\n",
    "\n",
    "utter_inputs = tf.keras.layers.concatenate([previous_action_embed,slots_embed,user_intent_embed],axis=1)\n",
    "bilstm = tf.keras.layers.Bidirectional(tf.keras.layers.GRU(64,return_sequences=True))(utter_inputs)\n",
    "x_in = tf.keras.layers.LayerNormalization()(bilstm)\n",
    "x_conv = tf.keras.layers.GlobalAveragePooling1D()(x_in)\n",
    "pre_action = tf.keras.layers.Dense(previous_action_len, activation='softmax',name = 'pre_action')(x_conv)\n",
    "model = tf.keras.Model([previous_action_inputs,slots_inputs,user_intent_inputs],pre_action)\n",
    "model.summary()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "losses = {'pre_action': 'categorical_crossentropy'}\n",
    "metrics = {'pre_action': ['accuracy']}\n",
    "optimizer = tf.keras.optimizers.Adam(params['lr'])\n",
    "model.compile(optimizer, loss=losses, metrics=metrics)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": true,
    "jupyter": {
     "outputs_hidden": true
    },
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch 1/500\n",
      "3/3 [==============================] - 0s 8ms/step - loss: 3.5199 - accuracy: 0.1243\n",
      "Epoch 2/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.2318 - accuracy: 0.1243\n",
      "Epoch 3/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.1034 - accuracy: 0.1243\n",
      "Epoch 4/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0538 - accuracy: 0.1243\n",
      "Epoch 5/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0538 - accuracy: 0.1356\n",
      "Epoch 6/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0666 - accuracy: 0.1130\n",
      "Epoch 7/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0736 - accuracy: 0.1243\n",
      "Epoch 8/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0744 - accuracy: 0.1243\n",
      "Epoch 9/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0684 - accuracy: 0.1243\n",
      "Epoch 10/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0586 - accuracy: 0.1243\n",
      "Epoch 11/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0504 - accuracy: 0.1243\n",
      "Epoch 12/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0446 - accuracy: 0.1243\n",
      "Epoch 13/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 3.0398 - accuracy: 0.1243\n",
      "Epoch 14/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0358 - accuracy: 0.1243\n",
      "Epoch 15/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0331 - accuracy: 0.1243\n",
      "Epoch 16/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0315 - accuracy: 0.1243\n",
      "Epoch 17/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0310 - accuracy: 0.1243\n",
      "Epoch 18/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0313 - accuracy: 0.1243\n",
      "Epoch 19/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0319 - accuracy: 0.1243\n",
      "Epoch 20/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0324 - accuracy: 0.1243\n",
      "Epoch 21/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0325 - accuracy: 0.1243\n",
      "Epoch 22/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0321 - accuracy: 0.1243\n",
      "Epoch 23/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0313 - accuracy: 0.1243\n",
      "Epoch 24/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0301 - accuracy: 0.1299\n",
      "Epoch 25/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0287 - accuracy: 0.1299\n",
      "Epoch 26/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0273 - accuracy: 0.1356\n",
      "Epoch 27/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0259 - accuracy: 0.1356\n",
      "Epoch 28/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0245 - accuracy: 0.1356\n",
      "Epoch 29/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0232 - accuracy: 0.1356\n",
      "Epoch 30/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0220 - accuracy: 0.1412\n",
      "Epoch 31/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0208 - accuracy: 0.1412\n",
      "Epoch 32/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0196 - accuracy: 0.1412\n",
      "Epoch 33/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0184 - accuracy: 0.1412\n",
      "Epoch 34/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0171 - accuracy: 0.1412\n",
      "Epoch 35/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 3.0158 - accuracy: 0.1412\n",
      "Epoch 36/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0144 - accuracy: 0.1412\n",
      "Epoch 37/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0129 - accuracy: 0.1412\n",
      "Epoch 38/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 3.0113 - accuracy: 0.1412\n",
      "Epoch 39/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0096 - accuracy: 0.1412\n",
      "Epoch 40/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0078 - accuracy: 0.1412\n",
      "Epoch 41/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0059 - accuracy: 0.1412\n",
      "Epoch 42/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0040 - accuracy: 0.1412\n",
      "Epoch 43/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 3.0019 - accuracy: 0.1412\n",
      "Epoch 44/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.9997 - accuracy: 0.1808\n",
      "Epoch 45/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.9974 - accuracy: 0.1808\n",
      "Epoch 46/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.9950 - accuracy: 0.1808\n",
      "Epoch 47/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.9924 - accuracy: 0.1808\n",
      "Epoch 48/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.9896 - accuracy: 0.1808\n",
      "Epoch 49/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.9866 - accuracy: 0.1808\n",
      "Epoch 50/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.9834 - accuracy: 0.1808\n",
      "Epoch 51/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.9799 - accuracy: 0.1808\n",
      "Epoch 52/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.9760 - accuracy: 0.1808\n",
      "Epoch 53/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.9718 - accuracy: 0.1808\n",
      "Epoch 54/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.9670 - accuracy: 0.1808\n",
      "Epoch 55/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.9617 - accuracy: 0.1808\n",
      "Epoch 56/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.9556 - accuracy: 0.1808\n",
      "Epoch 57/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.9485 - accuracy: 0.1808\n",
      "Epoch 58/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.9401 - accuracy: 0.1808\n",
      "Epoch 59/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.9299 - accuracy: 0.1808\n",
      "Epoch 60/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 2.9174 - accuracy: 0.1808\n",
      "Epoch 61/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 2.9023 - accuracy: 0.1808\n",
      "Epoch 62/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.8851 - accuracy: 0.1751\n",
      "Epoch 63/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.8671 - accuracy: 0.1751\n",
      "Epoch 64/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.8489 - accuracy: 0.1751\n",
      "Epoch 65/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.8350 - accuracy: 0.1751\n",
      "Epoch 66/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 2.8229 - accuracy: 0.1469\n",
      "Epoch 67/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 2.8119 - accuracy: 0.1469\n",
      "Epoch 68/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.7945 - accuracy: 0.1469\n",
      "Epoch 69/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 2.7656 - accuracy: 0.1469\n",
      "Epoch 70/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.7403 - accuracy: 0.1751\n",
      "Epoch 71/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 2.7299 - accuracy: 0.2090\n",
      "Epoch 72/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.7202 - accuracy: 0.2034\n",
      "Epoch 73/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 2.7024 - accuracy: 0.2034\n",
      "Epoch 74/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.6827 - accuracy: 0.1921\n",
      "Epoch 75/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.6686 - accuracy: 0.1921\n",
      "Epoch 76/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.6616 - accuracy: 0.1921\n",
      "Epoch 77/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.6568 - accuracy: 0.1921\n",
      "Epoch 78/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 2.6482 - accuracy: 0.1921\n",
      "Epoch 79/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.6518 - accuracy: 0.1921\n",
      "Epoch 80/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.6317 - accuracy: 0.1921\n",
      "Epoch 81/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.5918 - accuracy: 0.2034\n",
      "Epoch 82/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.6171 - accuracy: 0.2090\n",
      "Epoch 83/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.5921 - accuracy: 0.1921\n",
      "Epoch 84/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.5594 - accuracy: 0.2316\n",
      "Epoch 85/500\n",
      "3/3 [==============================] - 0s 9ms/step - loss: 2.5929 - accuracy: 0.2090\n",
      "Epoch 86/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.5698 - accuracy: 0.2203\n",
      "Epoch 87/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.5495 - accuracy: 0.2203\n",
      "Epoch 88/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.5327 - accuracy: 0.2260\n",
      "Epoch 89/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.4904 - accuracy: 0.2599\n",
      "Epoch 90/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.5065 - accuracy: 0.2542\n",
      "Epoch 91/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 2.5191 - accuracy: 0.2881\n",
      "Epoch 92/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 2.4885 - accuracy: 0.2768\n",
      "Epoch 93/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.5048 - accuracy: 0.2655\n",
      "Epoch 94/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.4420 - accuracy: 0.3164\n",
      "Epoch 95/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.4627 - accuracy: 0.2655\n",
      "Epoch 96/500\n",
      "3/3 [==============================] - 0s 8ms/step - loss: 2.4203 - accuracy: 0.2712\n",
      "Epoch 97/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.4233 - accuracy: 0.2938\n",
      "Epoch 98/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.3991 - accuracy: 0.2655\n",
      "Epoch 99/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.3922 - accuracy: 0.3616\n",
      "Epoch 100/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.3652 - accuracy: 0.2655\n",
      "Epoch 101/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.3383 - accuracy: 0.3842\n",
      "Epoch 102/500\n",
      "3/3 [==============================] - 0s 8ms/step - loss: 2.2895 - accuracy: 0.3729\n",
      "Epoch 103/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.2837 - accuracy: 0.3164\n",
      "Epoch 104/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.2602 - accuracy: 0.3333\n",
      "Epoch 105/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 2.2327 - accuracy: 0.3277\n",
      "Epoch 106/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 2.2048 - accuracy: 0.3785\n",
      "Epoch 107/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.2208 - accuracy: 0.3898\n",
      "Epoch 108/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.3420 - accuracy: 0.3107\n",
      "Epoch 109/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.2541 - accuracy: 0.3446\n",
      "Epoch 110/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.2208 - accuracy: 0.3164\n",
      "Epoch 111/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 2.2268 - accuracy: 0.3390\n",
      "Epoch 112/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.1963 - accuracy: 0.3277\n",
      "Epoch 113/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.2006 - accuracy: 0.3503\n",
      "Epoch 114/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 2.1373 - accuracy: 0.3672\n",
      "Epoch 115/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 2.1462 - accuracy: 0.3898\n",
      "Epoch 116/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.1480 - accuracy: 0.3503\n",
      "Epoch 117/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.1422 - accuracy: 0.3277\n",
      "Epoch 118/500\n",
      "3/3 [==============================] - 0s 8ms/step - loss: 2.1002 - accuracy: 0.3842\n",
      "Epoch 119/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.1336 - accuracy: 0.3616\n",
      "Epoch 120/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.0822 - accuracy: 0.4181\n",
      "Epoch 121/500\n",
      "3/3 [==============================] - 0s 8ms/step - loss: 2.1194 - accuracy: 0.3672\n",
      "Epoch 122/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.0674 - accuracy: 0.4068\n",
      "Epoch 123/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.1298 - accuracy: 0.3616\n",
      "Epoch 124/500\n",
      "3/3 [==============================] - 0s 8ms/step - loss: 2.0670 - accuracy: 0.4011\n",
      "Epoch 125/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.1357 - accuracy: 0.3616\n",
      "Epoch 126/500\n",
      "3/3 [==============================] - 0s 8ms/step - loss: 2.1460 - accuracy: 0.3729\n",
      "Epoch 127/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.0809 - accuracy: 0.3955\n",
      "Epoch 128/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 2.0179 - accuracy: 0.4294\n",
      "Epoch 129/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.0285 - accuracy: 0.3898\n",
      "Epoch 130/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.0507 - accuracy: 0.3672\n",
      "Epoch 131/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.0030 - accuracy: 0.3616\n",
      "Epoch 132/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.0205 - accuracy: 0.3616\n",
      "Epoch 133/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 2.0118 - accuracy: 0.3729\n",
      "Epoch 134/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 1.9500 - accuracy: 0.4068\n",
      "Epoch 135/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 1.9797 - accuracy: 0.4463\n",
      "Epoch 136/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.9913 - accuracy: 0.3672\n",
      "Epoch 137/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 2.0216 - accuracy: 0.3785\n",
      "Epoch 138/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.9598 - accuracy: 0.4068\n",
      "Epoch 139/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.9851 - accuracy: 0.3955\n",
      "Epoch 140/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 1.9808 - accuracy: 0.3842\n",
      "Epoch 141/500\n",
      "3/3 [==============================] - 0s 9ms/step - loss: 1.9051 - accuracy: 0.4294\n",
      "Epoch 142/500\n",
      "3/3 [==============================] - 0s 9ms/step - loss: 1.9443 - accuracy: 0.3785\n",
      "Epoch 143/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.8657 - accuracy: 0.4011\n",
      "Epoch 144/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.8685 - accuracy: 0.4689\n",
      "Epoch 145/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.9000 - accuracy: 0.4011\n",
      "Epoch 146/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.8854 - accuracy: 0.4633\n",
      "Epoch 147/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.9309 - accuracy: 0.3559\n",
      "Epoch 148/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 1.8848 - accuracy: 0.4802\n",
      "Epoch 149/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.8937 - accuracy: 0.3842\n",
      "Epoch 150/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 1.8850 - accuracy: 0.4576\n",
      "Epoch 151/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.8720 - accuracy: 0.4350\n",
      "Epoch 152/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.8484 - accuracy: 0.4576\n",
      "Epoch 153/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.8601 - accuracy: 0.3559\n",
      "Epoch 154/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.8107 - accuracy: 0.4802\n",
      "Epoch 155/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.8266 - accuracy: 0.4350\n",
      "Epoch 156/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.8156 - accuracy: 0.4407\n",
      "Epoch 157/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.7856 - accuracy: 0.4859\n",
      "Epoch 158/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.8449 - accuracy: 0.3842\n",
      "Epoch 159/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.7808 - accuracy: 0.4463\n",
      "Epoch 160/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.8343 - accuracy: 0.4520\n",
      "Epoch 161/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.7871 - accuracy: 0.4011\n",
      "Epoch 162/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.7937 - accuracy: 0.4802\n",
      "Epoch 163/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.7788 - accuracy: 0.4237\n",
      "Epoch 164/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.7480 - accuracy: 0.4689\n",
      "Epoch 165/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.7219 - accuracy: 0.4746\n",
      "Epoch 166/500\n",
      "3/3 [==============================] - 0s 8ms/step - loss: 1.7078 - accuracy: 0.4915\n",
      "Epoch 167/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.7064 - accuracy: 0.4689\n",
      "Epoch 168/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.7095 - accuracy: 0.5141\n",
      "Epoch 169/500\n",
      "3/3 [==============================] - 0s 8ms/step - loss: 1.7250 - accuracy: 0.4689\n",
      "Epoch 170/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.6757 - accuracy: 0.5254\n",
      "Epoch 171/500\n",
      "3/3 [==============================] - 0s 8ms/step - loss: 1.6653 - accuracy: 0.4915\n",
      "Epoch 172/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.6698 - accuracy: 0.5311\n",
      "Epoch 173/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.6667 - accuracy: 0.5141\n",
      "Epoch 174/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.6737 - accuracy: 0.4972\n",
      "Epoch 175/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.6495 - accuracy: 0.4972\n",
      "Epoch 176/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.7494 - accuracy: 0.4181\n",
      "Epoch 177/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.6521 - accuracy: 0.5141\n",
      "Epoch 178/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.6656 - accuracy: 0.5311\n",
      "Epoch 179/500\n",
      "3/3 [==============================] - 0s 8ms/step - loss: 1.6798 - accuracy: 0.4463\n",
      "Epoch 180/500\n",
      "3/3 [==============================] - 0s 8ms/step - loss: 1.6545 - accuracy: 0.4859\n",
      "Epoch 181/500\n",
      "3/3 [==============================] - 0s 8ms/step - loss: 1.7129 - accuracy: 0.4689\n",
      "Epoch 182/500\n",
      "3/3 [==============================] - 0s 8ms/step - loss: 1.6500 - accuracy: 0.5085\n",
      "Epoch 183/500\n",
      "3/3 [==============================] - 0s 8ms/step - loss: 1.7151 - accuracy: 0.4859\n",
      "Epoch 184/500\n",
      "3/3 [==============================] - 0s 9ms/step - loss: 1.6607 - accuracy: 0.4859\n",
      "Epoch 185/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 1.6950 - accuracy: 0.5198\n",
      "Epoch 186/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.6742 - accuracy: 0.4576\n",
      "Epoch 187/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.7122 - accuracy: 0.5254\n",
      "Epoch 188/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.7382 - accuracy: 0.4124\n",
      "Epoch 189/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 1.7148 - accuracy: 0.4463\n",
      "Epoch 190/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.6573 - accuracy: 0.4802\n",
      "Epoch 191/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.6805 - accuracy: 0.4520\n",
      "Epoch 192/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.6433 - accuracy: 0.5311\n",
      "Epoch 193/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.7346 - accuracy: 0.4068\n",
      "Epoch 194/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 1.5962 - accuracy: 0.5311\n",
      "Epoch 195/500\n",
      "3/3 [==============================] - 0s 8ms/step - loss: 1.7756 - accuracy: 0.4746\n",
      "Epoch 196/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 1.6582 - accuracy: 0.4915\n",
      "Epoch 197/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.5656 - accuracy: 0.5537\n",
      "Epoch 198/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.5947 - accuracy: 0.4972\n",
      "Epoch 199/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.5340 - accuracy: 0.5367\n",
      "Epoch 200/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.5221 - accuracy: 0.5367\n",
      "Epoch 201/500\n",
      "3/3 [==============================] - 0s 8ms/step - loss: 1.5203 - accuracy: 0.5763\n",
      "Epoch 202/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.4873 - accuracy: 0.5537\n",
      "Epoch 203/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.5154 - accuracy: 0.5932\n",
      "Epoch 204/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.4750 - accuracy: 0.5424\n",
      "Epoch 205/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.4897 - accuracy: 0.5932\n",
      "Epoch 206/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.4503 - accuracy: 0.5763\n",
      "Epoch 207/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.4690 - accuracy: 0.5932\n",
      "Epoch 208/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.4280 - accuracy: 0.5593\n",
      "Epoch 209/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.4386 - accuracy: 0.6102\n",
      "Epoch 210/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.4027 - accuracy: 0.5876\n",
      "Epoch 211/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.3981 - accuracy: 0.6045\n",
      "Epoch 212/500\n",
      "3/3 [==============================] - 0s 8ms/step - loss: 1.3737 - accuracy: 0.5989\n",
      "Epoch 213/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.3570 - accuracy: 0.6102\n",
      "Epoch 214/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.3418 - accuracy: 0.6045\n",
      "Epoch 215/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.3248 - accuracy: 0.6102\n",
      "Epoch 216/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.3091 - accuracy: 0.6271\n",
      "Epoch 217/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.2942 - accuracy: 0.6102\n",
      "Epoch 218/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.2765 - accuracy: 0.6271\n",
      "Epoch 219/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 1.2645 - accuracy: 0.6441\n",
      "Epoch 220/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.2443 - accuracy: 0.6780\n",
      "Epoch 221/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.2352 - accuracy: 0.6836\n",
      "Epoch 222/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 1.2155 - accuracy: 0.7232\n",
      "Epoch 223/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.2071 - accuracy: 0.6949\n",
      "Epoch 224/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.1884 - accuracy: 0.7232\n",
      "Epoch 225/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.1838 - accuracy: 0.6949\n",
      "Epoch 226/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.1647 - accuracy: 0.7232\n",
      "Epoch 227/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.1660 - accuracy: 0.6893\n",
      "Epoch 228/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.1494 - accuracy: 0.7232\n",
      "Epoch 229/500\n",
      "3/3 [==============================] - 0s 8ms/step - loss: 1.1582 - accuracy: 0.6836\n",
      "Epoch 230/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.1481 - accuracy: 0.7288\n",
      "Epoch 231/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.1672 - accuracy: 0.6836\n",
      "Epoch 232/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.1732 - accuracy: 0.7062\n",
      "Epoch 233/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.1970 - accuracy: 0.6554\n",
      "Epoch 234/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.1449 - accuracy: 0.7006\n",
      "Epoch 235/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.1151 - accuracy: 0.7288\n",
      "Epoch 236/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.0881 - accuracy: 0.6836\n",
      "Epoch 237/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.0791 - accuracy: 0.7288\n",
      "Epoch 238/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.0948 - accuracy: 0.6949\n",
      "Epoch 239/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.0725 - accuracy: 0.7288\n",
      "Epoch 240/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.0518 - accuracy: 0.7345\n",
      "Epoch 241/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.0289 - accuracy: 0.7006\n",
      "Epoch 242/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.0324 - accuracy: 0.7345\n",
      "Epoch 243/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.0246 - accuracy: 0.6949\n",
      "Epoch 244/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 1.0172 - accuracy: 0.7288\n",
      "Epoch 245/500\n",
      "3/3 [==============================] - 0s 8ms/step - loss: 1.0127 - accuracy: 0.7119\n",
      "Epoch 246/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.9992 - accuracy: 0.7458\n",
      "Epoch 247/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.9918 - accuracy: 0.7232\n",
      "Epoch 248/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.9729 - accuracy: 0.7458\n",
      "Epoch 249/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.9742 - accuracy: 0.7401\n",
      "Epoch 250/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.9596 - accuracy: 0.7458\n",
      "Epoch 251/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.9530 - accuracy: 0.7514\n",
      "Epoch 252/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.9493 - accuracy: 0.7345\n",
      "Epoch 253/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.9408 - accuracy: 0.7514\n",
      "Epoch 254/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.9349 - accuracy: 0.7514\n",
      "Epoch 255/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.9295 - accuracy: 0.7514\n",
      "Epoch 256/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.9217 - accuracy: 0.7514\n",
      "Epoch 257/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.9165 - accuracy: 0.7514\n",
      "Epoch 258/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.9111 - accuracy: 0.7514\n",
      "Epoch 259/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.9041 - accuracy: 0.7571\n",
      "Epoch 260/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.8997 - accuracy: 0.7514\n",
      "Epoch 261/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.8927 - accuracy: 0.7571\n",
      "Epoch 262/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.8886 - accuracy: 0.7571\n",
      "Epoch 263/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.8831 - accuracy: 0.7571\n",
      "Epoch 264/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.8798 - accuracy: 0.7514\n",
      "Epoch 265/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.8777 - accuracy: 0.7514\n",
      "Epoch 266/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.8803 - accuracy: 0.7232\n",
      "Epoch 267/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.8853 - accuracy: 0.7571\n",
      "Epoch 268/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.9020 - accuracy: 0.7232\n",
      "Epoch 269/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.9332 - accuracy: 0.7458\n",
      "Epoch 270/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.9548 - accuracy: 0.7006\n",
      "Epoch 271/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.9826 - accuracy: 0.7401\n",
      "Epoch 272/500\n",
      "3/3 [==============================] - 0s 8ms/step - loss: 0.9240 - accuracy: 0.6893\n",
      "Epoch 273/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.8711 - accuracy: 0.7288\n",
      "Epoch 274/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.9004 - accuracy: 0.7345\n",
      "Epoch 275/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.8894 - accuracy: 0.7062\n",
      "Epoch 276/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.8735 - accuracy: 0.7458\n",
      "Epoch 277/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.8466 - accuracy: 0.7458\n",
      "Epoch 278/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.8280 - accuracy: 0.7514\n",
      "Epoch 279/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.8446 - accuracy: 0.7401\n",
      "Epoch 280/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.8356 - accuracy: 0.7401\n",
      "Epoch 281/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.8108 - accuracy: 0.7345\n",
      "Epoch 282/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.8141 - accuracy: 0.7684\n",
      "Epoch 283/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.8018 - accuracy: 0.7627\n",
      "Epoch 284/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.7925 - accuracy: 0.7684\n",
      "Epoch 285/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.7899 - accuracy: 0.7684\n",
      "Epoch 286/500\n",
      "3/3 [==============================] - 0s 8ms/step - loss: 0.7786 - accuracy: 0.7571\n",
      "Epoch 287/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.7817 - accuracy: 0.7797\n",
      "Epoch 288/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.7762 - accuracy: 0.7740\n",
      "Epoch 289/500\n",
      "3/3 [==============================] - 0s 9ms/step - loss: 0.7630 - accuracy: 0.7684\n",
      "Epoch 290/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.7781 - accuracy: 0.7853\n",
      "Epoch 291/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.7746 - accuracy: 0.7514\n",
      "Epoch 292/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.7585 - accuracy: 0.7514\n",
      "Epoch 293/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.7644 - accuracy: 0.7740\n",
      "Epoch 294/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.7542 - accuracy: 0.7740\n",
      "Epoch 295/500\n",
      "3/3 [==============================] - 0s 8ms/step - loss: 0.7395 - accuracy: 0.7740\n",
      "Epoch 296/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.7493 - accuracy: 0.7684\n",
      "Epoch 297/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.7484 - accuracy: 0.7571\n",
      "Epoch 298/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.7361 - accuracy: 0.7684\n",
      "Epoch 299/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.7367 - accuracy: 0.7797\n",
      "Epoch 300/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.7264 - accuracy: 0.7740\n",
      "Epoch 301/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.7180 - accuracy: 0.7797\n",
      "Epoch 302/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.7117 - accuracy: 0.7797\n",
      "Epoch 303/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.7103 - accuracy: 0.7797\n",
      "Epoch 304/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.7022 - accuracy: 0.7797\n",
      "Epoch 305/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.6975 - accuracy: 0.7740\n",
      "Epoch 306/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.7035 - accuracy: 0.7797\n",
      "Epoch 307/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.7036 - accuracy: 0.7684\n",
      "Epoch 308/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.6898 - accuracy: 0.7684\n",
      "Epoch 309/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.6984 - accuracy: 0.7684\n",
      "Epoch 310/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.6805 - accuracy: 0.7797\n",
      "Epoch 311/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.7010 - accuracy: 0.7797\n",
      "Epoch 312/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.7320 - accuracy: 0.7910\n",
      "Epoch 313/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.7935 - accuracy: 0.7175\n",
      "Epoch 314/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.7634 - accuracy: 0.7853\n",
      "Epoch 315/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.8066 - accuracy: 0.7175\n",
      "Epoch 316/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.7085 - accuracy: 0.7853\n",
      "Epoch 317/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.7053 - accuracy: 0.8079\n",
      "Epoch 318/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.6737 - accuracy: 0.7684\n",
      "Epoch 319/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.7173 - accuracy: 0.7571\n",
      "Epoch 320/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.6959 - accuracy: 0.7684\n",
      "Epoch 321/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.7709 - accuracy: 0.7514\n",
      "Epoch 322/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.7313 - accuracy: 0.7966\n",
      "Epoch 323/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.7737 - accuracy: 0.7740\n",
      "Epoch 324/500\n",
      "3/3 [==============================] - 0s 8ms/step - loss: 0.7769 - accuracy: 0.7345\n",
      "Epoch 325/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.7805 - accuracy: 0.7288\n",
      "Epoch 326/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.7007 - accuracy: 0.7966\n",
      "Epoch 327/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.7190 - accuracy: 0.7797\n",
      "Epoch 328/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.7373 - accuracy: 0.7514\n",
      "Epoch 329/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.7527 - accuracy: 0.7797\n",
      "Epoch 330/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.7385 - accuracy: 0.7401\n",
      "Epoch 331/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.6501 - accuracy: 0.8192\n",
      "Epoch 332/500\n",
      "3/3 [==============================] - 0s 10ms/step - loss: 0.6821 - accuracy: 0.8136\n",
      "Epoch 333/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.6738 - accuracy: 0.8023\n",
      "Epoch 334/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.6362 - accuracy: 0.7797\n",
      "Epoch 335/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.6374 - accuracy: 0.8079\n",
      "Epoch 336/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.6300 - accuracy: 0.8136\n",
      "Epoch 337/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.6058 - accuracy: 0.8079\n",
      "Epoch 338/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.6420 - accuracy: 0.7966\n",
      "Epoch 339/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.6833 - accuracy: 0.8249\n",
      "Epoch 340/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.6557 - accuracy: 0.7910\n",
      "Epoch 341/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.6874 - accuracy: 0.7910\n",
      "Epoch 342/500\n",
      "3/3 [==============================] - 0s 9ms/step - loss: 0.6363 - accuracy: 0.7627\n",
      "Epoch 343/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.6216 - accuracy: 0.8023\n",
      "Epoch 344/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.6687 - accuracy: 0.7966\n",
      "Epoch 345/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.5962 - accuracy: 0.8192\n",
      "Epoch 346/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.6377 - accuracy: 0.8249\n",
      "Epoch 347/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.6080 - accuracy: 0.8305\n",
      "Epoch 348/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.6156 - accuracy: 0.8192\n",
      "Epoch 349/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.5961 - accuracy: 0.8079\n",
      "Epoch 350/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.5872 - accuracy: 0.7966\n",
      "Epoch 351/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.5733 - accuracy: 0.8305\n",
      "Epoch 352/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.5636 - accuracy: 0.8249\n",
      "Epoch 353/500\n",
      "3/3 [==============================] - 0s 8ms/step - loss: 0.5630 - accuracy: 0.8362\n",
      "Epoch 354/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.5605 - accuracy: 0.8249\n",
      "Epoch 355/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.5543 - accuracy: 0.8531\n",
      "Epoch 356/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.5810 - accuracy: 0.7966\n",
      "Epoch 357/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.5493 - accuracy: 0.8531\n",
      "Epoch 358/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.5432 - accuracy: 0.8418\n",
      "Epoch 359/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.5339 - accuracy: 0.8588\n",
      "Epoch 360/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.5335 - accuracy: 0.8588\n",
      "Epoch 361/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.5268 - accuracy: 0.8644\n",
      "Epoch 362/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.5313 - accuracy: 0.8531\n",
      "Epoch 363/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.5112 - accuracy: 0.8701\n",
      "Epoch 364/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.5379 - accuracy: 0.8531\n",
      "Epoch 365/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.5223 - accuracy: 0.8757\n",
      "Epoch 366/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.5059 - accuracy: 0.8644\n",
      "Epoch 367/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.5399 - accuracy: 0.8305\n",
      "Epoch 368/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.5185 - accuracy: 0.8644\n",
      "Epoch 369/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.5114 - accuracy: 0.8701\n",
      "Epoch 370/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.5100 - accuracy: 0.8644\n",
      "Epoch 371/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.5361 - accuracy: 0.8531\n",
      "Epoch 372/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.5058 - accuracy: 0.8588\n",
      "Epoch 373/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.5081 - accuracy: 0.8249\n",
      "Epoch 374/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.5038 - accuracy: 0.8701\n",
      "Epoch 375/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.4966 - accuracy: 0.8588\n",
      "Epoch 376/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.4815 - accuracy: 0.8644\n",
      "Epoch 377/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4936 - accuracy: 0.8644\n",
      "Epoch 378/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.4740 - accuracy: 0.8588\n",
      "Epoch 379/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4905 - accuracy: 0.8644\n",
      "Epoch 380/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.4760 - accuracy: 0.8757\n",
      "Epoch 381/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.4795 - accuracy: 0.8927\n",
      "Epoch 382/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4620 - accuracy: 0.8701\n",
      "Epoch 383/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4835 - accuracy: 0.8588\n",
      "Epoch 384/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4733 - accuracy: 0.8757\n",
      "Epoch 385/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4817 - accuracy: 0.8644\n",
      "Epoch 386/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4612 - accuracy: 0.8814\n",
      "Epoch 387/500\n",
      "3/3 [==============================] - 0s 9ms/step - loss: 0.4781 - accuracy: 0.8475\n",
      "Epoch 388/500\n",
      "3/3 [==============================] - 0s 9ms/step - loss: 0.4498 - accuracy: 0.8870\n",
      "Epoch 389/500\n",
      "3/3 [==============================] - 0s 8ms/step - loss: 0.4474 - accuracy: 0.8927\n",
      "Epoch 390/500\n",
      "3/3 [==============================] - 0s 8ms/step - loss: 0.4425 - accuracy: 0.8870\n",
      "Epoch 391/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4363 - accuracy: 0.8870\n",
      "Epoch 392/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4375 - accuracy: 0.8870\n",
      "Epoch 393/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4313 - accuracy: 0.8870\n",
      "Epoch 394/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.4336 - accuracy: 0.8870\n",
      "Epoch 395/500\n",
      "3/3 [==============================] - 0s 8ms/step - loss: 0.4405 - accuracy: 0.8870\n",
      "Epoch 396/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.4244 - accuracy: 0.8757\n",
      "Epoch 397/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.4346 - accuracy: 0.8870\n",
      "Epoch 398/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.4280 - accuracy: 0.8814\n",
      "Epoch 399/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.4219 - accuracy: 0.8870\n",
      "Epoch 400/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4145 - accuracy: 0.8814\n",
      "Epoch 401/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4176 - accuracy: 0.8927\n",
      "Epoch 402/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4295 - accuracy: 0.8870\n",
      "Epoch 403/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.4064 - accuracy: 0.8927\n",
      "Epoch 404/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.4229 - accuracy: 0.8870\n",
      "Epoch 405/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4466 - accuracy: 0.8757\n",
      "Epoch 406/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.4225 - accuracy: 0.8870\n",
      "Epoch 407/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.4674 - accuracy: 0.8927\n",
      "Epoch 408/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4293 - accuracy: 0.8588\n",
      "Epoch 409/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4496 - accuracy: 0.8927\n",
      "Epoch 410/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.3985 - accuracy: 0.8814\n",
      "Epoch 411/500\n",
      "3/3 [==============================] - 0s 8ms/step - loss: 0.4273 - accuracy: 0.8701\n",
      "Epoch 412/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4062 - accuracy: 0.8870\n",
      "Epoch 413/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4035 - accuracy: 0.8757\n",
      "Epoch 414/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4354 - accuracy: 0.8870\n",
      "Epoch 415/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4554 - accuracy: 0.8701\n",
      "Epoch 416/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4118 - accuracy: 0.8757\n",
      "Epoch 417/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4330 - accuracy: 0.8644\n",
      "Epoch 418/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4028 - accuracy: 0.8870\n",
      "Epoch 419/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4097 - accuracy: 0.8870\n",
      "Epoch 420/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.3926 - accuracy: 0.8757\n",
      "Epoch 421/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4126 - accuracy: 0.8701\n",
      "Epoch 422/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4754 - accuracy: 0.8362\n",
      "Epoch 423/500\n",
      "3/3 [==============================] - 0s 8ms/step - loss: 0.4369 - accuracy: 0.8588\n",
      "Epoch 424/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4274 - accuracy: 0.8927\n",
      "Epoch 425/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.4204 - accuracy: 0.8757\n",
      "Epoch 426/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4184 - accuracy: 0.8701\n",
      "Epoch 427/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4051 - accuracy: 0.8701\n",
      "Epoch 428/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4089 - accuracy: 0.8983\n",
      "Epoch 429/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.3983 - accuracy: 0.8870\n",
      "Epoch 430/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4243 - accuracy: 0.8757\n",
      "Epoch 431/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.3868 - accuracy: 0.8870\n",
      "Epoch 432/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.3682 - accuracy: 0.9040\n",
      "Epoch 433/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.3758 - accuracy: 0.8870\n",
      "Epoch 434/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.3629 - accuracy: 0.8927\n",
      "Epoch 435/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.3775 - accuracy: 0.8983\n",
      "Epoch 436/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.3597 - accuracy: 0.8927\n",
      "Epoch 437/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4428 - accuracy: 0.8644\n",
      "Epoch 438/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4190 - accuracy: 0.8870\n",
      "Epoch 439/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4216 - accuracy: 0.8870\n",
      "Epoch 440/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.3614 - accuracy: 0.8927\n",
      "Epoch 441/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4375 - accuracy: 0.8870\n",
      "Epoch 442/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4117 - accuracy: 0.8870\n",
      "Epoch 443/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.5441 - accuracy: 0.8644\n",
      "Epoch 444/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4973 - accuracy: 0.8757\n",
      "Epoch 445/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4727 - accuracy: 0.8701\n",
      "Epoch 446/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4731 - accuracy: 0.8475\n",
      "Epoch 447/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4795 - accuracy: 0.8418\n",
      "Epoch 448/500\n",
      "3/3 [==============================] - 0s 8ms/step - loss: 0.4170 - accuracy: 0.8757\n",
      "Epoch 449/500\n",
      "3/3 [==============================] - 0s 8ms/step - loss: 0.3907 - accuracy: 0.8870\n",
      "Epoch 450/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4582 - accuracy: 0.8644\n",
      "Epoch 451/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4462 - accuracy: 0.8814\n",
      "Epoch 452/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4100 - accuracy: 0.8814\n",
      "Epoch 453/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.3855 - accuracy: 0.8757\n",
      "Epoch 454/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.3719 - accuracy: 0.8814\n",
      "Epoch 455/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.3610 - accuracy: 0.8870\n",
      "Epoch 456/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.3747 - accuracy: 0.8757\n",
      "Epoch 457/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.3529 - accuracy: 0.8757\n",
      "Epoch 458/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.3366 - accuracy: 0.9153\n",
      "Epoch 459/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.3276 - accuracy: 0.9040\n",
      "Epoch 460/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.3301 - accuracy: 0.9322\n",
      "Epoch 461/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.3231 - accuracy: 0.9153\n",
      "Epoch 462/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.3221 - accuracy: 0.9322\n",
      "Epoch 463/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.3253 - accuracy: 0.9040\n",
      "Epoch 464/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.3229 - accuracy: 0.9209\n",
      "Epoch 465/500\n",
      "3/3 [==============================] - 0s 8ms/step - loss: 0.3155 - accuracy: 0.9040\n",
      "Epoch 466/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.3507 - accuracy: 0.8814\n",
      "Epoch 467/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.3962 - accuracy: 0.8757\n",
      "Epoch 468/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.3958 - accuracy: 0.8531\n",
      "Epoch 469/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4894 - accuracy: 0.8531\n",
      "Epoch 470/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.3831 - accuracy: 0.8927\n",
      "Epoch 471/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.5314 - accuracy: 0.8588\n",
      "Epoch 472/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.4527 - accuracy: 0.8418\n",
      "Epoch 473/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.4264 - accuracy: 0.8927\n",
      "Epoch 474/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.5922 - accuracy: 0.8192\n",
      "Epoch 475/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.5334 - accuracy: 0.8418\n",
      "Epoch 476/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4379 - accuracy: 0.8644\n",
      "Epoch 477/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4058 - accuracy: 0.8588\n",
      "Epoch 478/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4094 - accuracy: 0.8531\n",
      "Epoch 479/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.3680 - accuracy: 0.8418\n",
      "Epoch 480/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.3971 - accuracy: 0.8418\n",
      "Epoch 481/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.3898 - accuracy: 0.8983\n",
      "Epoch 482/500\n",
      "3/3 [==============================] - 0s 8ms/step - loss: 0.3575 - accuracy: 0.8927\n",
      "Epoch 483/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4100 - accuracy: 0.8588\n",
      "Epoch 484/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4203 - accuracy: 0.8870\n",
      "Epoch 485/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4140 - accuracy: 0.8757\n",
      "Epoch 486/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4622 - accuracy: 0.8362\n",
      "Epoch 487/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.4127 - accuracy: 0.8757\n",
      "Epoch 488/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.4038 - accuracy: 0.8644\n",
      "Epoch 489/500\n",
      "3/3 [==============================] - 0s 10ms/step - loss: 0.4184 - accuracy: 0.8531\n",
      "Epoch 490/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.3691 - accuracy: 0.8927\n",
      "Epoch 491/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.3436 - accuracy: 0.8927\n",
      "Epoch 492/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.3489 - accuracy: 0.9153\n",
      "Epoch 493/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.3322 - accuracy: 0.9096\n",
      "Epoch 494/500\n",
      "3/3 [==============================] - 0s 6ms/step - loss: 0.3197 - accuracy: 0.8927\n",
      "Epoch 495/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.3228 - accuracy: 0.8983\n",
      "Epoch 496/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.3247 - accuracy: 0.9153\n",
      "Epoch 497/500\n",
      "3/3 [==============================] - ETA: 0s - loss: 0.2158 - accuracy: 0.93 - 0s 7ms/step - loss: 0.3013 - accuracy: 0.9153\n",
      "Epoch 498/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.3100 - accuracy: 0.9096\n",
      "Epoch 499/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.3206 - accuracy: 0.9040\n",
      "Epoch 500/500\n",
      "3/3 [==============================] - 0s 7ms/step - loss: 0.2997 - accuracy: 0.9040\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "<tensorflow.python.keras.callbacks.History at 0x7f53c12ba410>"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model.fit(train_dataset,epochs=params['epochs'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [],
   "source": [
    "model.save_weights('../DM_model_weight/DM_weight_629.h5')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
